/**
 * @author: mxt
 * @create: 2024-09-03 10:52
 * @Version 1.0
 **/
public class TestSwap1 {
    /**
     * 定义两个变量，交换二者的值,请用三种方法实现
     *
     * @param args
     */
    public static void main(String[] args) {

        int a = 1;
        int b = 2;
        //定义一个临时变量
        int s = a;
        a = b;
        b = s;
        System.out.println(a + "," + b);
    }
}
